---
title: "SQL-007: Get policy address"
summary: Retrieve a policy address by policy, address type, and contact type.
status: draft
owner: SAIF Corporation
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# SQL-007 Get policy address

Retrieve a policy address by policy, address type, and contact type.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-007 |
| **Operation type** | Read |
| **Execution method** | Stored procedure |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | StoredProcedure |
| **Business object** | `clsPolicyAddress` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve` / `AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:inPolicyNum` | Input | Decimal | N/A | Policy number |
| `:inAddressType` | Input | String | 5 | Address type code |
| `:inContactType` | Input | String | 5 | Contact type code |
| `:inGetMailAddrWhenNotFound` | Input | String | 5 | Fall back to mailing address flag |
| `recordset` | Output (Cursor) | REF CURSOR | N/A | Address row |

## Tables

N/A — Stored procedure

## Sample SQL

```sql
-- Oracle stored procedure call (CommandType.StoredProcedure)
-- clsPolicyAddress.BeforeRetrieve (default branch)
CALL pk72846_view_policy.getPolicyAddress(
  :inPolicyNum,
  :inAddressType,
  :inContactType,
  :inGetMailAddrWhenNotFound,
  :recordset)
```


## Operations and processes
- [Retrieve addresses](../operations-processes.md)

## Business rules
- [BR-VP-010: Demo users see masked data](../business-rules.md#br-vp-010-demo-users-see-masked-data)
- [BR-VP-027: Create/Insert/Update/Delete SQL are invalid](../business-rules.md#br-vp-027-createinsertupdatedelete-sql-are-invalid)

## Sources
- `SAIF.Business.View.Policy/clsPolicyAddress.vb`
